<script type="text/javascript" src="__PUBLIC__/admin/js/kindeditor/kindeditor.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript">
function submitForm(action) {
    $(".submit").click(function(){
        if ("" == $.trim($("#typename").val())) {
            popup.error("栏目名称不能为空");
            return false;
        }
        var url = ('create' == action) ? "{:U('Contype/create')}" : "{:U('Contype/update')}";
        commonAjaxSubmit(url);
        return false;
    });
}

$(".ispart").on("click", function(){
	if($(this).val() == 2){
		$(".typedir").removeClass("hide");
	}else{
		$(".typedir").addClass("hide");
	}
});
</script>
